package com.aidex.biz.service.impl;

import java.util.List;
import com.aidex.common.annotation.DataScope;
import com.github.pagehelper.PageInfo;
import com.aidex.common.core.domain.entity.SysUser;
import com.aidex.common.core.domain.entity.SysDept;
import com.aidex.common.core.service.BaseServiceImpl;
import com.aidex.framework.cache.DeptUtils;
import com.aidex.framework.cache.UserUtils;
import org.springframework.stereotype.Service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.aidex.biz.mapper.LianzhengJiansheMapper;
import com.aidex.biz.domain.LianzhengJianshe;
import com.aidex.biz.service.LianzhengJiansheService;
import org.springframework.transaction.annotation.Transactional;
import com.aidex.common.utils.NumberUtils;

/**
 * 廉政建设Service业务层处理
 * @author sean
 * @email 2074844820@qq.com
 * @date 2024-12-19
 */
@Service
@Transactional(readOnly = true)
public class LianzhengJiansheServiceImpl extends BaseServiceImpl<LianzhengJiansheMapper, LianzhengJianshe> implements LianzhengJiansheService
{
    private static final Logger log = LoggerFactory.getLogger(LianzhengJiansheServiceImpl.class);

    /**
     * 获取单条数据
     * @param lianzhengJianshe 廉政建设
     * @return 廉政建设
     */
    @Override
    public LianzhengJianshe get(LianzhengJianshe lianzhengJianshe)
    {
        LianzhengJianshe dto = super.get(lianzhengJianshe);
        return dto;
    }

    /**
     * 获取单条数据
     * @param id 廉政建设id
     * @return 廉政建设
     */
    @Override
    public LianzhengJianshe get(String id)
    {
        LianzhengJianshe dto = super.get(id);
        return dto;
    }


    /**
     * 查询廉政建设列表
     * @param lianzhengJianshe 廉政建设
     * @return 廉政建设
     */
    @Override
    @DataScope(userAlias = "a",deptAlias = "a")
    public List<LianzhengJianshe> findList(LianzhengJianshe lianzhengJianshe)
    {
        return super.findList(lianzhengJianshe);
    }

    /**
     * 分页查询廉政建设列表
     * @param lianzhengJianshe 廉政建设
     * @return 廉政建设
     */
    @Override
    @DataScope(userAlias = "a",deptAlias = "a")
    public PageInfo<LianzhengJianshe> findPage(LianzhengJianshe lianzhengJianshe)
    {
        return super.findPage(lianzhengJianshe);
    }

    /**
     * 保存廉政建设
     * @param lianzhengJianshe
     * @return 结果
     */
    @Override
    public boolean save(LianzhengJianshe lianzhengJianshe)
    {
        return super.save(lianzhengJianshe);
    }


    /**
     * 删除廉政建设信息
     * @param lianzhengJianshe
     * @return 结果
     */
    @Override
    public boolean remove(LianzhengJianshe lianzhengJianshe)
    {
        return super.remove(lianzhengJianshe);
    }

    /**
     * 批量删除廉政建设
     * @param ids 需要删除的廉政建设ID
     * @return 结果
     */
    @Transactional(readOnly = false)
    @Override
    public int deleteLianzhengJiansheByIds(String[] ids)
    {
        return mapper.deleteLianzhengJiansheByIds(ids);
    }

    /**
     * 获取最大编号
     * @param lianzhengJianshe 廉政建设
     * @return 结果
     */
    @Override
    public int findMaxSort(LianzhengJianshe lianzhengJianshe)
    {
        return NumberUtils.nextOrder(mapper.findMaxSort(lianzhengJianshe));
    }
}
